package com.wlc.springdemo.controller;

import com.wlc.springdemo.po.Category;
import com.wlc.springdemo.service.UserInfoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
public class CategoryController {


    @Resource
    private UserInfoService userInfoService;

    @GetMapping("/listCategory")
    public String listCategory() {
        List<Category> cs = userInfoService.findAll();
        System.out.println("cs = " + cs);
        return cs.toString();
    }

}